import request from '@/config/axios'

// 记账企业年度费用 VO
export interface AccountingCompaniesYearVO {
  id: number // 序号
  companyName: string // 企业名称
  entrustStartDate: Date // 委托开始时间
  entrustEndDate: Date // 委托结束时间
  unifiedSocialCreditCode: string // 统一社会信用代码
  monthlyFee: number // 月服务费(元)
  years: number // 年份
  remarks: string // 备注
  creatorName: string // 创建者
  updaterName: string // 更新者
}

// 记账企业年度费用 API
export const AccountingCompaniesYearApi = {
  // 查询记账企业年度费用分页
  getAccountingCompaniesYearPage: async (params: any) => {
    return await request.get({ url: `/oa/accounting-companies-year/page`, params })
  },

  // 查询记账企业年度费用详情
  getAccountingCompaniesYear: async (id: number) => {
    return await request.get({ url: `/oa/accounting-companies-year/get?id=` + id })
  },

  // 新增记账企业年度费用
  createAccountingCompaniesYear: async (data: AccountingCompaniesYearVO) => {
    return await request.post({ url: `/oa/accounting-companies-year/create`, data })
  },

  // 修改记账企业年度费用
  updateAccountingCompaniesYear: async (data: AccountingCompaniesYearVO) => {
    return await request.put({ url: `/oa/accounting-companies-year/update`, data })
  },

  // 删除记账企业年度费用
  deleteAccountingCompaniesYear: async (id: number) => {
    return await request.delete({ url: `/oa/accounting-companies-year/delete?id=` + id })
  },

  // 导出记账企业年度费用 Excel
  exportAccountingCompaniesYear: async (params) => {
    return await request.download({ url: `/oa/accounting-companies-year/export-excel`, params })
  },
}